﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Polymorphism;
using Emotions;

namespace ReactionTester
{
    class Program
    {
        static void Main(string[] args)
        {
            // Polymorphism at work #1: a Rectangle, Triangle and Circle 
            // can all be used whereever a Shape is expected. No cast is 
            // required because an implicit conversion exists from a derived  
            // class to its base class.
            List<Pattern> shapes = new List<Pattern>();
            shapes.Add(new Anger());
            shapes.Add(new Fear());
            
            // Polymorphism at work #2: the virtual method Draw is 
            // invoked on each of the derived classes, not the base class. 
            foreach (Pattern s in shapes)
            {
                s.PatternActivator();
            }

            // Keep the console open in debug mode.
            Console.WriteLine("Press any key to exit.");
            Console.ReadKey();
        }
    }
}
